"""
URL configuration for complete_web project.

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/4.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from tw591.views import depart_view, user_manage_view, login_view

urlpatterns = [
    path("admin/", admin.site.urls),
    path("depart_list/", depart_view.depart_list),
    path("depart_add/", depart_view.depart_add),
    path('depart/<int:pid>/edit/', depart_view.depart_edit),
    path('depart/<int:pid>/delete/', depart_view.depart_delete),
    path('user_list/', user_manage_view.user_list),
    path('user_add/', user_manage_view.user_add),
    path('user/<int:uid>/edit/', user_manage_view.user_edit),
    path('user/<int:uid>/delete/', user_manage_view.user_delete),
    path('user/<int:uid>/delete/', user_manage_view.user_delete),

    # 登录
    path('login/', login_view.login),
    path('logout/', login_view.logout),
    path('image/code/', login_view.image_code),

]
